<script type="text/javascript">
$(document).ready(function(){
	$("#id_inacbg").select2(); 
});
</script>
<div id=tiga_ba>
	<div id=tiga_baa>Tambah Tarif INACBG</div>
	<div id=tiga_bab></div>
	<div class=clear></div>
</div>
<?php
	$kls = $_GET['id_kelas_tarif'];
?>         
<form action="utama.php?module=mod_tarif_inacbg&id_kelas_tarif=<?php echo $kls;?>&act=simpan" onsubmit="return gsValidate('tarif','Tarif Harus Diisi','required');" method="post">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Nama INACBG</td>
			<td>
				<select name="id_inacbg" id="id_inacbg" class="input">
					<?php
						$inacbg = mysql_query("select kode_inacbg,deskripsi from master_inacbg");
						while($hasil = mysql_fetch_array($inacbg)){
							$cek = mysql_query("select id_tarif_inacbg from tarif_inacbg where id_kelas_tarif = $kls and kode_inacbg = '$hasil[kode_inacbg]'");
							$jml = mysql_num_rows($cek);
							
							if($jml == 0){
								echo "<option value='$hasil[kode_inacbg]'>$hasil[deskripsi]</option>";
							}
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Tarif</td>
			<td>
				<input name="tarif" type="text" class="input2" id="tarif" size="5"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Simpan" /></td>
		</tr>
	</table>                
</form>		
            
        